<?php
    if(count($dsNhomInMenu) > 0){

?>
<div class="SubContent02Wrapper">
    <div class="MenuRight">
        <ul class="MenuRightList">
            <?php
            foreach ($dsNhomInMenu as $nhom){
                $url = "";
                echo '<li>';
                if($nhom->one_page == 0)
                {
                    echo CHtml::link($nhom->ten_nhom, array('baiviet/dsbaiviet', 'alias' => $nhom->link, 'id' => $nhom->id));
                }else{
                    foreach($dsBaiVietInNhom as $baiViet){
                        if($baiViet->dmnhombv_id == $nhom->id){
                            $url = Yii::app()->createUrl('baiviet/gioithieubaiviet', array('menu'=>$menu->alias,'alias' => $baiViet->link, 'id' => $baiViet->id));
                            break;
                        }
                    }
                    echo $url != ""?'<a href="'.$url.'">'.$nhom->ten_nhom.'</a>':$nhom->ten_nhom;
                }
                echo '</li>';
            }

            ?>
        </ul>
    </div>
</div>
<?php }?>